import java.util.Scanner;

public class MAin1426 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] arr=new int[n];
        for (int i=0;i< arr.length;i++){
            arr[i]=sc.nextInt();
        }
        int a=0;
        double b=0;
        int c=0;
        double d=0;
        int e=0;
        double f=0;
        int g=0;
        double h=0;
        for (int i=0;i<arr.length;i++){
            if (arr[i]>=0&&arr[i]<=18){
                a++;
                b=a*100.0/n;
            }else if (arr[i]>=19&&arr[i]<=35){
                c++;
                d=c*100.0/n;
            }else if (arr[i]>=36&&arr[i]<=60){
                e++;
                f=e*100.0/n;
            }else if (arr[i]>=61){
                g++;
                h=g*100.0/n;
            }
        }
        System.out.print(a+" ");
        System.out.print(String.format("%.2f",b));
        System.out.println("%");
        System.out.print(c+" ");
        System.out.print(String.format("%.2f",d));
        System.out.println("%");
        System.out.print(e+" ");
        System.out.print(String.format("%.2f",f));
        System.out.println("%");
        System.out.print(g+" ");
        System.out.print(String.format("%.2f",h));
        System.out.print("%");
    }
}
